import rxAjax from '@/assets/js/ajax.js';

//图表数据模型 api接口
export const ChartDataModelApi = {};

ChartDataModelApi.baseUrl= '/api-form/form/core/chartDataModel';


//获取图表数据
ChartDataModelApi.getData =function(config) {
    let url='/api-form/form/core/chartDataModel/getData';
    return rxAjax.postJson(url,config);
}

//根据数据字典获取选项
ChartDataModelApi.getByDic =function(dicKey,parentId) {
    let url= "/api-system/system/core/sysDic/getByPidAndDicId";
    let params={dicKey:dicKey,parentId:parentId};
    return rxAjax.get(url,params);
}

//根据自定义sql获取选项
ChartDataModelApi.getBySql =function(sqlKey,params) {
    let url= "/api-form/form/core/formCustomQuery/queryForJson_"+sqlKey;
    return rxAjax.postForm(url,params);
}



export  default ChartDataModelApi;

